<?php
# array_walk_recursive
$database = include './database.php';
function array_change(array $data, int $type = CASE_UPPER): array
{
    array_walk_recursive($data, function (&$value, $key, $type) {
        $action = $type == CASE_UPPER ? 'strtoupper' : 'strtolower';
        $value = $action($value);
    }, $type);
}

print_r(array_change($database));
